#include <iostream>
#include <list>
#include <functional>

using namespace std;


class FunctorA
{
public:
    void operator ()(){
        cout<<"class Functor A"<<endl;
    }
};

class FunctorB
{
public:
    void operator ()(){
        cout<<"class Functor B"<<endl;
    }
};

class FunctorC
{
public:
    void operator ()(){
        cout<<"class Functor C"<<endl;
    }
};


class Object
{
public:
    Object(FunctorA a,FunctorB b,FunctorC c) {
        _list.push_back(a);
        _list.push_back(b);
        _list.push_back(c);
    }
    void notify()
    {
        for(auto & item:_list)
        {
            item();
        }
    }
private:
    list<function<void()>> _list;
};


int main()
{
    FunctorA a;FunctorB b;FunctorC c;
    Object obj(a,b,c);
    obj.notify();

    return 0;
}
